// Generated from Nasm.g4 by ANTLR 4.9.3
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class NasmParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		A0=1, A1=2, A2=3, A3=4, A4=5, B0=6, B1=7, B2=8, B3=9, B4=10, Decimal=11, 
		Octal=12, Hex=13, Binary=14, WS=15, Vstart=16, Global=17, Externed=18, 
		Section=19, Equ=20, Times=21, Bits=22, Db=23, Dw=24, Dd=25, Dq=26, ADD=27, 
		SUB=28, MVK=29, MV=30, NOP=31, FuncUnit=32, Id=33, Char=34, Add=35, Sub=36, 
		Mul=37, Div=38, Lshift=39, Rshift=40, Lbrace=41, Rbrace=42, Lparen=43, 
		Rparen=44, Equal=45, Increment=46, Decrement=47, Or=48, Colon=49, Comma=50, 
		Semicolon=51, A=52, B=53, C=54, D=55, E=56, F=57, G=58, H=59, I=60, J=61, 
		K=62, L=63, M=64, N=65, O=66, P=67, Q=68, R=69, S=70, T=71, U=72, V=73, 
		W=74, X=75, Y=76, Z=77;
	public static final int
		RULE_program = 0, RULE_statement = 1, RULE_declare = 2, RULE_idTail = 3, 
		RULE_data = 4, RULE_type = 5, RULE_sign = 6, RULE_instructionPacket = 7, 
		RULE_instruction = 8, RULE_threeOp = 9, RULE_twoOp = 10, RULE_oneOp = 11, 
		RULE_noneOp = 12, RULE_operand = 13, RULE_regs = 14, RULE_reg = 15, RULE_memory = 16, 
		RULE_lop = 17, RULE_rop = 18, RULE_expr = 19, RULE_adds = 20, RULE_item = 21, 
		RULE_muls = 22, RULE_factor = 23, RULE_shift = 24, RULE_val = 25, RULE_num = 26, 
		RULE_size = 27;
	private static String[] makeRuleNames() {
		return new String[] {
			"program", "statement", "declare", "idTail", "data", "type", "sign", 
			"instructionPacket", "instruction", "threeOp", "twoOp", "oneOp", "noneOp", 
			"operand", "regs", "reg", "memory", "lop", "rop", "expr", "adds", "item", 
			"muls", "factor", "shift", "val", "num", "size"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, null, null, null, null, null, null, null, null, null, null, null, 
			null, null, null, null, null, null, null, null, null, null, null, null, 
			null, null, null, null, null, null, null, null, null, null, null, "'+'", 
			"'-'", "'*'", "'\\'", "'<<'", "'>>'", "'['", "']'", "'('", "')'", "'='", 
			"'++'", "'--'", "'||'", "':'", "','", "';'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, "A0", "A1", "A2", "A3", "A4", "B0", "B1", "B2", "B3", "B4", "Decimal", 
			"Octal", "Hex", "Binary", "WS", "Vstart", "Global", "Externed", "Section", 
			"Equ", "Times", "Bits", "Db", "Dw", "Dd", "Dq", "ADD", "SUB", "MVK", 
			"MV", "NOP", "FuncUnit", "Id", "Char", "Add", "Sub", "Mul", "Div", "Lshift", 
			"Rshift", "Lbrace", "Rbrace", "Lparen", "Rparen", "Equal", "Increment", 
			"Decrement", "Or", "Colon", "Comma", "Semicolon", "A", "B", "C", "D", 
			"E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", 
			"S", "T", "U", "V", "W", "X", "Y", "Z"
		};
	}
	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "Nasm.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }

	public NasmParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}

	public static class ProgramContext extends ParserRuleContext {
		public TerminalNode EOF() { return getToken(NasmParser.EOF, 0); }
		public List<StatementContext> statement() {
			return getRuleContexts(StatementContext.class);
		}
		public StatementContext statement(int i) {
			return getRuleContext(StatementContext.class,i);
		}
		public ProgramContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_program; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterProgram(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitProgram(this);
		}
	}

	public final ProgramContext program() throws RecognitionException {
		ProgramContext _localctx = new ProgramContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_program);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(59);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Global) | (1L << Externed) | (1L << Section) | (1L << Times) | (1L << Db) | (1L << Dw) | (1L << Dd) | (1L << Dq) | (1L << ADD) | (1L << SUB) | (1L << MVK) | (1L << MV) | (1L << NOP) | (1L << Id) | (1L << Lbrace))) != 0)) {
				{
				{
				setState(56);
				statement();
				}
				}
				setState(61);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(62);
			match(EOF);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class StatementContext extends ParserRuleContext {
		public DeclareContext declare() {
			return getRuleContext(DeclareContext.class,0);
		}
		public InstructionPacketContext instructionPacket() {
			return getRuleContext(InstructionPacketContext.class,0);
		}
		public StatementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_statement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterStatement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitStatement(this);
		}
	}

	public final StatementContext statement() throws RecognitionException {
		StatementContext _localctx = new StatementContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_statement);
		try {
			setState(66);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Global:
			case Externed:
			case Section:
			case Times:
			case Db:
			case Dw:
			case Dd:
			case Dq:
			case Id:
			case Lbrace:
				enterOuterAlt(_localctx, 1);
				{
				setState(64);
				declare();
				}
				break;
			case ADD:
			case SUB:
			case MVK:
			case MV:
			case NOP:
				enterOuterAlt(_localctx, 2);
				{
				setState(65);
				instructionPacket();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class DeclareContext extends ParserRuleContext {
		public TerminalNode Section() { return getToken(NasmParser.Section, 0); }
		public TerminalNode Id() { return getToken(NasmParser.Id, 0); }
		public TerminalNode Global() { return getToken(NasmParser.Global, 0); }
		public TerminalNode Externed() { return getToken(NasmParser.Externed, 0); }
		public IdTailContext idTail() {
			return getRuleContext(IdTailContext.class,0);
		}
		public TerminalNode Lbrace() { return getToken(NasmParser.Lbrace, 0); }
		public TerminalNode Bits() { return getToken(NasmParser.Bits, 0); }
		public NumContext num() {
			return getRuleContext(NumContext.class,0);
		}
		public TerminalNode Rbrace() { return getToken(NasmParser.Rbrace, 0); }
		public TerminalNode Times() { return getToken(NasmParser.Times, 0); }
		public SizeContext size() {
			return getRuleContext(SizeContext.class,0);
		}
		public DataContext data() {
			return getRuleContext(DataContext.class,0);
		}
		public DeclareContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_declare; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterDeclare(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitDeclare(this);
		}
	}

	public final DeclareContext declare() throws RecognitionException {
		DeclareContext _localctx = new DeclareContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_declare);
		try {
			setState(89);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Section:
				enterOuterAlt(_localctx, 1);
				{
				setState(68);
				match(Section);
				setState(69);
				match(Id);
				}
				break;
			case Global:
				enterOuterAlt(_localctx, 2);
				{
				setState(70);
				match(Global);
				setState(71);
				match(Id);
				}
				break;
			case Externed:
				enterOuterAlt(_localctx, 3);
				{
				setState(72);
				match(Externed);
				setState(73);
				match(Id);
				}
				break;
			case Id:
				enterOuterAlt(_localctx, 4);
				{
				setState(74);
				match(Id);
				setState(75);
				idTail();
				}
				break;
			case Lbrace:
				enterOuterAlt(_localctx, 5);
				{
				setState(76);
				match(Lbrace);
				setState(77);
				match(Bits);
				setState(78);
				num();
				setState(79);
				match(Rbrace);
				}
				break;
			case Times:
				enterOuterAlt(_localctx, 6);
				{
				setState(81);
				match(Times);
				setState(82);
				num();
				setState(83);
				size();
				setState(84);
				data();
				}
				break;
			case Db:
			case Dw:
			case Dd:
			case Dq:
				enterOuterAlt(_localctx, 7);
				{
				setState(86);
				size();
				setState(87);
				data();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class IdTailContext extends ParserRuleContext {
		public TerminalNode Colon() { return getToken(NasmParser.Colon, 0); }
		public TerminalNode Equ() { return getToken(NasmParser.Equ, 0); }
		public ExprContext expr() {
			return getRuleContext(ExprContext.class,0);
		}
		public IdTailContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_idTail; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterIdTail(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitIdTail(this);
		}
	}

	public final IdTailContext idTail() throws RecognitionException {
		IdTailContext _localctx = new IdTailContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_idTail);
		try {
			setState(94);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Colon:
				enterOuterAlt(_localctx, 1);
				{
				setState(91);
				match(Colon);
				}
				break;
			case Equ:
				enterOuterAlt(_localctx, 2);
				{
				setState(92);
				match(Equ);
				setState(93);
				expr();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class DataContext extends ParserRuleContext {
		public List<TypeContext> type() {
			return getRuleContexts(TypeContext.class);
		}
		public TypeContext type(int i) {
			return getRuleContext(TypeContext.class,i);
		}
		public List<TerminalNode> Comma() { return getTokens(NasmParser.Comma); }
		public TerminalNode Comma(int i) {
			return getToken(NasmParser.Comma, i);
		}
		public DataContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_data; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterData(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitData(this);
		}
	}

	public final DataContext data() throws RecognitionException {
		DataContext _localctx = new DataContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_data);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(96);
			type();
			setState(101);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==Comma) {
				{
				{
				setState(97);
				match(Comma);
				setState(98);
				type();
				}
				}
				setState(103);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TypeContext extends ParserRuleContext {
		public NumContext num() {
			return getRuleContext(NumContext.class,0);
		}
		public SignContext sign() {
			return getRuleContext(SignContext.class,0);
		}
		public TerminalNode Id() { return getToken(NasmParser.Id, 0); }
		public TerminalNode Char() { return getToken(NasmParser.Char, 0); }
		public TypeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_type; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterType(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitType(this);
		}
	}

	public final TypeContext type() throws RecognitionException {
		TypeContext _localctx = new TypeContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_type);
		int _la;
		try {
			setState(110);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Decimal:
			case Octal:
			case Hex:
			case Binary:
			case Add:
			case Sub:
				enterOuterAlt(_localctx, 1);
				{
				setState(105);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==Add || _la==Sub) {
					{
					setState(104);
					sign();
					}
				}

				setState(107);
				num();
				}
				break;
			case Id:
				enterOuterAlt(_localctx, 2);
				{
				setState(108);
				match(Id);
				}
				break;
			case Char:
				enterOuterAlt(_localctx, 3);
				{
				setState(109);
				match(Char);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SignContext extends ParserRuleContext {
		public TerminalNode Add() { return getToken(NasmParser.Add, 0); }
		public TerminalNode Sub() { return getToken(NasmParser.Sub, 0); }
		public SignContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_sign; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterSign(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitSign(this);
		}
	}

	public final SignContext sign() throws RecognitionException {
		SignContext _localctx = new SignContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_sign);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(112);
			_la = _input.LA(1);
			if ( !(_la==Add || _la==Sub) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class InstructionPacketContext extends ParserRuleContext {
		public List<InstructionContext> instruction() {
			return getRuleContexts(InstructionContext.class);
		}
		public InstructionContext instruction(int i) {
			return getRuleContext(InstructionContext.class,i);
		}
		public List<TerminalNode> Or() { return getTokens(NasmParser.Or); }
		public TerminalNode Or(int i) {
			return getToken(NasmParser.Or, i);
		}
		public InstructionPacketContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_instructionPacket; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterInstructionPacket(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitInstructionPacket(this);
		}
	}

	public final InstructionPacketContext instructionPacket() throws RecognitionException {
		InstructionPacketContext _localctx = new InstructionPacketContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_instructionPacket);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(114);
			instruction();
			setState(119);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==Or) {
				{
				{
				setState(115);
				match(Or);
				setState(116);
				instruction();
				}
				}
				setState(121);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class InstructionContext extends ParserRuleContext {
		public ThreeOpContext threeOp() {
			return getRuleContext(ThreeOpContext.class,0);
		}
		public List<OperandContext> operand() {
			return getRuleContexts(OperandContext.class);
		}
		public OperandContext operand(int i) {
			return getRuleContext(OperandContext.class,i);
		}
		public List<TerminalNode> Comma() { return getTokens(NasmParser.Comma); }
		public TerminalNode Comma(int i) {
			return getToken(NasmParser.Comma, i);
		}
		public TerminalNode FuncUnit() { return getToken(NasmParser.FuncUnit, 0); }
		public TwoOpContext twoOp() {
			return getRuleContext(TwoOpContext.class,0);
		}
		public OneOpContext oneOp() {
			return getRuleContext(OneOpContext.class,0);
		}
		public NoneOpContext noneOp() {
			return getRuleContext(NoneOpContext.class,0);
		}
		public InstructionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_instruction; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterInstruction(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitInstruction(this);
		}
	}

	public final InstructionContext instruction() throws RecognitionException {
		InstructionContext _localctx = new InstructionContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_instruction);
		int _la;
		try {
			setState(150);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(122);
				threeOp();
				setState(124);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==FuncUnit) {
					{
					setState(123);
					match(FuncUnit);
					}
				}

				setState(126);
				operand();
				setState(127);
				match(Comma);
				setState(128);
				operand();
				setState(129);
				match(Comma);
				setState(130);
				operand();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(132);
				twoOp();
				setState(134);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==FuncUnit) {
					{
					setState(133);
					match(FuncUnit);
					}
				}

				setState(136);
				operand();
				setState(137);
				match(Comma);
				setState(138);
				operand();
				}
				break;
			case 3:
				enterOuterAlt(_localctx, 3);
				{
				setState(140);
				oneOp();
				setState(142);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==FuncUnit) {
					{
					setState(141);
					match(FuncUnit);
					}
				}

				setState(144);
				operand();
				}
				break;
			case 4:
				enterOuterAlt(_localctx, 4);
				{
				setState(146);
				noneOp();
				setState(148);
				_errHandler.sync(this);
				_la = _input.LA(1);
				if (_la==FuncUnit) {
					{
					setState(147);
					match(FuncUnit);
					}
				}

				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ThreeOpContext extends ParserRuleContext {
		public TerminalNode ADD() { return getToken(NasmParser.ADD, 0); }
		public TerminalNode SUB() { return getToken(NasmParser.SUB, 0); }
		public ThreeOpContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_threeOp; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterThreeOp(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitThreeOp(this);
		}
	}

	public final ThreeOpContext threeOp() throws RecognitionException {
		ThreeOpContext _localctx = new ThreeOpContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_threeOp);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(152);
			_la = _input.LA(1);
			if ( !(_la==ADD || _la==SUB) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TwoOpContext extends ParserRuleContext {
		public TerminalNode MV() { return getToken(NasmParser.MV, 0); }
		public TerminalNode MVK() { return getToken(NasmParser.MVK, 0); }
		public TwoOpContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_twoOp; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterTwoOp(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitTwoOp(this);
		}
	}

	public final TwoOpContext twoOp() throws RecognitionException {
		TwoOpContext _localctx = new TwoOpContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_twoOp);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(154);
			_la = _input.LA(1);
			if ( !(_la==MVK || _la==MV) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OneOpContext extends ParserRuleContext {
		public TerminalNode NOP() { return getToken(NasmParser.NOP, 0); }
		public OneOpContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_oneOp; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterOneOp(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitOneOp(this);
		}
	}

	public final OneOpContext oneOp() throws RecognitionException {
		OneOpContext _localctx = new OneOpContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_oneOp);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(156);
			match(NOP);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class NoneOpContext extends ParserRuleContext {
		public TerminalNode NOP() { return getToken(NasmParser.NOP, 0); }
		public NoneOpContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_noneOp; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterNoneOp(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitNoneOp(this);
		}
	}

	public final NoneOpContext noneOp() throws RecognitionException {
		NoneOpContext _localctx = new NoneOpContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_noneOp);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(158);
			match(NOP);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OperandContext extends ParserRuleContext {
		public NumContext num() {
			return getRuleContext(NumContext.class,0);
		}
		public RegsContext regs() {
			return getRuleContext(RegsContext.class,0);
		}
		public MemoryContext memory() {
			return getRuleContext(MemoryContext.class,0);
		}
		public OperandContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_operand; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterOperand(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitOperand(this);
		}
	}

	public final OperandContext operand() throws RecognitionException {
		OperandContext _localctx = new OperandContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_operand);
		try {
			setState(163);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Decimal:
			case Octal:
			case Hex:
			case Binary:
				enterOuterAlt(_localctx, 1);
				{
				setState(160);
				num();
				}
				break;
			case A0:
			case A1:
			case A2:
			case A3:
			case A4:
			case B0:
			case B1:
			case B2:
			case B3:
			case B4:
				enterOuterAlt(_localctx, 2);
				{
				setState(161);
				regs();
				}
				break;
			case Mul:
				enterOuterAlt(_localctx, 3);
				{
				setState(162);
				memory();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RegsContext extends ParserRuleContext {
		public List<RegContext> reg() {
			return getRuleContexts(RegContext.class);
		}
		public RegContext reg(int i) {
			return getRuleContext(RegContext.class,i);
		}
		public TerminalNode Colon() { return getToken(NasmParser.Colon, 0); }
		public RegsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_regs; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterRegs(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitRegs(this);
		}
	}

	public final RegsContext regs() throws RecognitionException {
		RegsContext _localctx = new RegsContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_regs);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(165);
			reg();
			setState(168);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==Colon) {
				{
				setState(166);
				match(Colon);
				setState(167);
				reg();
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RegContext extends ParserRuleContext {
		public TerminalNode A0() { return getToken(NasmParser.A0, 0); }
		public TerminalNode A1() { return getToken(NasmParser.A1, 0); }
		public TerminalNode A2() { return getToken(NasmParser.A2, 0); }
		public TerminalNode A3() { return getToken(NasmParser.A3, 0); }
		public TerminalNode A4() { return getToken(NasmParser.A4, 0); }
		public TerminalNode B0() { return getToken(NasmParser.B0, 0); }
		public TerminalNode B1() { return getToken(NasmParser.B1, 0); }
		public TerminalNode B2() { return getToken(NasmParser.B2, 0); }
		public TerminalNode B3() { return getToken(NasmParser.B3, 0); }
		public TerminalNode B4() { return getToken(NasmParser.B4, 0); }
		public RegContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_reg; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterReg(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitReg(this);
		}
	}

	public final RegContext reg() throws RecognitionException {
		RegContext _localctx = new RegContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_reg);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(170);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << A0) | (1L << A1) | (1L << A2) | (1L << A3) | (1L << A4) | (1L << B0) | (1L << B1) | (1L << B2) | (1L << B3) | (1L << B4))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MemoryContext extends ParserRuleContext {
		public TerminalNode Mul() { return getToken(NasmParser.Mul, 0); }
		public LopContext lop() {
			return getRuleContext(LopContext.class,0);
		}
		public List<RegContext> reg() {
			return getRuleContexts(RegContext.class);
		}
		public RegContext reg(int i) {
			return getRuleContext(RegContext.class,i);
		}
		public RopContext rop() {
			return getRuleContext(RopContext.class,0);
		}
		public TerminalNode Lbrace() { return getToken(NasmParser.Lbrace, 0); }
		public TerminalNode Rbrace() { return getToken(NasmParser.Rbrace, 0); }
		public NumContext num() {
			return getRuleContext(NumContext.class,0);
		}
		public MemoryContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_memory; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterMemory(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitMemory(this);
		}
	}

	public final MemoryContext memory() throws RecognitionException {
		MemoryContext _localctx = new MemoryContext(_ctx, getState());
		enterRule(_localctx, 32, RULE_memory);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(172);
			match(Mul);
			setState(173);
			lop();
			setState(174);
			reg();
			setState(175);
			rop();
			setState(176);
			match(Lbrace);
			setState(179);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case A0:
			case A1:
			case A2:
			case A3:
			case A4:
			case B0:
			case B1:
			case B2:
			case B3:
			case B4:
				{
				setState(177);
				reg();
				}
				break;
			case Decimal:
			case Octal:
			case Hex:
			case Binary:
				{
				setState(178);
				num();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
			setState(181);
			match(Rbrace);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class LopContext extends ParserRuleContext {
		public TerminalNode Increment() { return getToken(NasmParser.Increment, 0); }
		public TerminalNode Add() { return getToken(NasmParser.Add, 0); }
		public TerminalNode Decrement() { return getToken(NasmParser.Decrement, 0); }
		public TerminalNode Sub() { return getToken(NasmParser.Sub, 0); }
		public LopContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_lop; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterLop(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitLop(this);
		}
	}

	public final LopContext lop() throws RecognitionException {
		LopContext _localctx = new LopContext(_ctx, getState());
		enterRule(_localctx, 34, RULE_lop);
		int _la;
		try {
			setState(185);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Add:
			case Sub:
			case Increment:
			case Decrement:
				enterOuterAlt(_localctx, 1);
				{
				setState(183);
				_la = _input.LA(1);
				if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Add) | (1L << Sub) | (1L << Increment) | (1L << Decrement))) != 0)) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				}
				break;
			case A0:
			case A1:
			case A2:
			case A3:
			case A4:
			case B0:
			case B1:
			case B2:
			case B3:
			case B4:
				enterOuterAlt(_localctx, 2);
				{
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RopContext extends ParserRuleContext {
		public TerminalNode Increment() { return getToken(NasmParser.Increment, 0); }
		public TerminalNode Decrement() { return getToken(NasmParser.Decrement, 0); }
		public RopContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_rop; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterRop(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitRop(this);
		}
	}

	public final RopContext rop() throws RecognitionException {
		RopContext _localctx = new RopContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_rop);
		int _la;
		try {
			setState(189);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Increment:
			case Decrement:
				enterOuterAlt(_localctx, 1);
				{
				setState(187);
				_la = _input.LA(1);
				if ( !(_la==Increment || _la==Decrement) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				}
				break;
			case Lbrace:
				enterOuterAlt(_localctx, 2);
				{
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExprContext extends ParserRuleContext {
		public List<ItemContext> item() {
			return getRuleContexts(ItemContext.class);
		}
		public ItemContext item(int i) {
			return getRuleContext(ItemContext.class,i);
		}
		public List<AddsContext> adds() {
			return getRuleContexts(AddsContext.class);
		}
		public AddsContext adds(int i) {
			return getRuleContext(AddsContext.class,i);
		}
		public ExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitExpr(this);
		}
	}

	public final ExprContext expr() throws RecognitionException {
		ExprContext _localctx = new ExprContext(_ctx, getState());
		enterRule(_localctx, 38, RULE_expr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(191);
			item();
			setState(197);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==Add || _la==Sub) {
				{
				{
				setState(192);
				adds();
				setState(193);
				item();
				}
				}
				setState(199);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AddsContext extends ParserRuleContext {
		public TerminalNode Add() { return getToken(NasmParser.Add, 0); }
		public TerminalNode Sub() { return getToken(NasmParser.Sub, 0); }
		public AddsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_adds; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterAdds(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitAdds(this);
		}
	}

	public final AddsContext adds() throws RecognitionException {
		AddsContext _localctx = new AddsContext(_ctx, getState());
		enterRule(_localctx, 40, RULE_adds);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(200);
			_la = _input.LA(1);
			if ( !(_la==Add || _la==Sub) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ItemContext extends ParserRuleContext {
		public List<FactorContext> factor() {
			return getRuleContexts(FactorContext.class);
		}
		public FactorContext factor(int i) {
			return getRuleContext(FactorContext.class,i);
		}
		public List<MulsContext> muls() {
			return getRuleContexts(MulsContext.class);
		}
		public MulsContext muls(int i) {
			return getRuleContext(MulsContext.class,i);
		}
		public ItemContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_item; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterItem(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitItem(this);
		}
	}

	public final ItemContext item() throws RecognitionException {
		ItemContext _localctx = new ItemContext(_ctx, getState());
		enterRule(_localctx, 42, RULE_item);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(202);
			factor();
			setState(208);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==Mul || _la==Div) {
				{
				{
				setState(203);
				muls();
				setState(204);
				factor();
				}
				}
				setState(210);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MulsContext extends ParserRuleContext {
		public TerminalNode Mul() { return getToken(NasmParser.Mul, 0); }
		public TerminalNode Div() { return getToken(NasmParser.Div, 0); }
		public MulsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_muls; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterMuls(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitMuls(this);
		}
	}

	public final MulsContext muls() throws RecognitionException {
		MulsContext _localctx = new MulsContext(_ctx, getState());
		enterRule(_localctx, 44, RULE_muls);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(211);
			_la = _input.LA(1);
			if ( !(_la==Mul || _la==Div) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FactorContext extends ParserRuleContext {
		public List<ValContext> val() {
			return getRuleContexts(ValContext.class);
		}
		public ValContext val(int i) {
			return getRuleContext(ValContext.class,i);
		}
		public List<ShiftContext> shift() {
			return getRuleContexts(ShiftContext.class);
		}
		public ShiftContext shift(int i) {
			return getRuleContext(ShiftContext.class,i);
		}
		public FactorContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_factor; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterFactor(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitFactor(this);
		}
	}

	public final FactorContext factor() throws RecognitionException {
		FactorContext _localctx = new FactorContext(_ctx, getState());
		enterRule(_localctx, 46, RULE_factor);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(213);
			val();
			setState(219);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==Lshift || _la==Rshift) {
				{
				{
				setState(214);
				shift();
				setState(215);
				val();
				}
				}
				setState(221);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ShiftContext extends ParserRuleContext {
		public TerminalNode Lshift() { return getToken(NasmParser.Lshift, 0); }
		public TerminalNode Rshift() { return getToken(NasmParser.Rshift, 0); }
		public ShiftContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_shift; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterShift(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitShift(this);
		}
	}

	public final ShiftContext shift() throws RecognitionException {
		ShiftContext _localctx = new ShiftContext(_ctx, getState());
		enterRule(_localctx, 48, RULE_shift);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(222);
			_la = _input.LA(1);
			if ( !(_la==Lshift || _la==Rshift) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ValContext extends ParserRuleContext {
		public TerminalNode Lparen() { return getToken(NasmParser.Lparen, 0); }
		public ExprContext expr() {
			return getRuleContext(ExprContext.class,0);
		}
		public TerminalNode Rparen() { return getToken(NasmParser.Rparen, 0); }
		public TerminalNode Id() { return getToken(NasmParser.Id, 0); }
		public NumContext num() {
			return getRuleContext(NumContext.class,0);
		}
		public ValContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_val; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterVal(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitVal(this);
		}
	}

	public final ValContext val() throws RecognitionException {
		ValContext _localctx = new ValContext(_ctx, getState());
		enterRule(_localctx, 50, RULE_val);
		try {
			setState(230);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Lparen:
				enterOuterAlt(_localctx, 1);
				{
				setState(224);
				match(Lparen);
				setState(225);
				expr();
				setState(226);
				match(Rparen);
				}
				break;
			case Id:
				enterOuterAlt(_localctx, 2);
				{
				setState(228);
				match(Id);
				}
				break;
			case Decimal:
			case Octal:
			case Hex:
			case Binary:
				enterOuterAlt(_localctx, 3);
				{
				setState(229);
				num();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class NumContext extends ParserRuleContext {
		public TerminalNode Decimal() { return getToken(NasmParser.Decimal, 0); }
		public TerminalNode Octal() { return getToken(NasmParser.Octal, 0); }
		public TerminalNode Hex() { return getToken(NasmParser.Hex, 0); }
		public TerminalNode Binary() { return getToken(NasmParser.Binary, 0); }
		public NumContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_num; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterNum(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitNum(this);
		}
	}

	public final NumContext num() throws RecognitionException {
		NumContext _localctx = new NumContext(_ctx, getState());
		enterRule(_localctx, 52, RULE_num);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(232);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Decimal) | (1L << Octal) | (1L << Hex) | (1L << Binary))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SizeContext extends ParserRuleContext {
		public TerminalNode Db() { return getToken(NasmParser.Db, 0); }
		public TerminalNode Dw() { return getToken(NasmParser.Dw, 0); }
		public TerminalNode Dd() { return getToken(NasmParser.Dd, 0); }
		public TerminalNode Dq() { return getToken(NasmParser.Dq, 0); }
		public SizeContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_size; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).enterSize(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof NasmListener ) ((NasmListener)listener).exitSize(this);
		}
	}

	public final SizeContext size() throws RecognitionException {
		SizeContext _localctx = new SizeContext(_ctx, getState());
		enterRule(_localctx, 54, RULE_size);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(234);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Db) | (1L << Dw) | (1L << Dd) | (1L << Dq))) != 0)) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3O\u00ef\4\2\t\2\4"+
		"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+
		"\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
		"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
		"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\3\2\7\2<\n\2\f\2\16\2?\13\2\3"+
		"\2\3\2\3\3\3\3\5\3E\n\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3"+
		"\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\\\n\4\3\5\3\5\3\5\5\5a\n\5"+
		"\3\6\3\6\3\6\7\6f\n\6\f\6\16\6i\13\6\3\7\5\7l\n\7\3\7\3\7\3\7\5\7q\n\7"+
		"\3\b\3\b\3\t\3\t\3\t\7\tx\n\t\f\t\16\t{\13\t\3\n\3\n\5\n\177\n\n\3\n\3"+
		"\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u0089\n\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u0091"+
		"\n\n\3\n\3\n\3\n\3\n\5\n\u0097\n\n\5\n\u0099\n\n\3\13\3\13\3\f\3\f\3\r"+
		"\3\r\3\16\3\16\3\17\3\17\3\17\5\17\u00a6\n\17\3\20\3\20\3\20\5\20\u00ab"+
		"\n\20\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u00b6\n\22\3\22"+
		"\3\22\3\23\3\23\5\23\u00bc\n\23\3\24\3\24\5\24\u00c0\n\24\3\25\3\25\3"+
		"\25\3\25\7\25\u00c6\n\25\f\25\16\25\u00c9\13\25\3\26\3\26\3\27\3\27\3"+
		"\27\3\27\7\27\u00d1\n\27\f\27\16\27\u00d4\13\27\3\30\3\30\3\31\3\31\3"+
		"\31\3\31\7\31\u00dc\n\31\f\31\16\31\u00df\13\31\3\32\3\32\3\33\3\33\3"+
		"\33\3\33\3\33\3\33\5\33\u00e9\n\33\3\34\3\34\3\35\3\35\3\35\2\2\36\2\4"+
		"\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668\2\f\3\2%&\3"+
		"\2\35\36\3\2\37 \3\2\3\f\4\2%&\60\61\3\2\60\61\3\2\'(\3\2)*\3\2\r\20\3"+
		"\2\31\34\2\u00f2\2=\3\2\2\2\4D\3\2\2\2\6[\3\2\2\2\b`\3\2\2\2\nb\3\2\2"+
		"\2\fp\3\2\2\2\16r\3\2\2\2\20t\3\2\2\2\22\u0098\3\2\2\2\24\u009a\3\2\2"+
		"\2\26\u009c\3\2\2\2\30\u009e\3\2\2\2\32\u00a0\3\2\2\2\34\u00a5\3\2\2\2"+
		"\36\u00a7\3\2\2\2 \u00ac\3\2\2\2\"\u00ae\3\2\2\2$\u00bb\3\2\2\2&\u00bf"+
		"\3\2\2\2(\u00c1\3\2\2\2*\u00ca\3\2\2\2,\u00cc\3\2\2\2.\u00d5\3\2\2\2\60"+
		"\u00d7\3\2\2\2\62\u00e0\3\2\2\2\64\u00e8\3\2\2\2\66\u00ea\3\2\2\28\u00ec"+
		"\3\2\2\2:<\5\4\3\2;:\3\2\2\2<?\3\2\2\2=;\3\2\2\2=>\3\2\2\2>@\3\2\2\2?"+
		"=\3\2\2\2@A\7\2\2\3A\3\3\2\2\2BE\5\6\4\2CE\5\20\t\2DB\3\2\2\2DC\3\2\2"+
		"\2E\5\3\2\2\2FG\7\25\2\2G\\\7#\2\2HI\7\23\2\2I\\\7#\2\2JK\7\24\2\2K\\"+
		"\7#\2\2LM\7#\2\2M\\\5\b\5\2NO\7+\2\2OP\7\30\2\2PQ\5\66\34\2QR\7,\2\2R"+
		"\\\3\2\2\2ST\7\27\2\2TU\5\66\34\2UV\58\35\2VW\5\n\6\2W\\\3\2\2\2XY\58"+
		"\35\2YZ\5\n\6\2Z\\\3\2\2\2[F\3\2\2\2[H\3\2\2\2[J\3\2\2\2[L\3\2\2\2[N\3"+
		"\2\2\2[S\3\2\2\2[X\3\2\2\2\\\7\3\2\2\2]a\7\63\2\2^_\7\26\2\2_a\5(\25\2"+
		"`]\3\2\2\2`^\3\2\2\2a\t\3\2\2\2bg\5\f\7\2cd\7\64\2\2df\5\f\7\2ec\3\2\2"+
		"\2fi\3\2\2\2ge\3\2\2\2gh\3\2\2\2h\13\3\2\2\2ig\3\2\2\2jl\5\16\b\2kj\3"+
		"\2\2\2kl\3\2\2\2lm\3\2\2\2mq\5\66\34\2nq\7#\2\2oq\7$\2\2pk\3\2\2\2pn\3"+
		"\2\2\2po\3\2\2\2q\r\3\2\2\2rs\t\2\2\2s\17\3\2\2\2ty\5\22\n\2uv\7\62\2"+
		"\2vx\5\22\n\2wu\3\2\2\2x{\3\2\2\2yw\3\2\2\2yz\3\2\2\2z\21\3\2\2\2{y\3"+
		"\2\2\2|~\5\24\13\2}\177\7\"\2\2~}\3\2\2\2~\177\3\2\2\2\177\u0080\3\2\2"+
		"\2\u0080\u0081\5\34\17\2\u0081\u0082\7\64\2\2\u0082\u0083\5\34\17\2\u0083"+
		"\u0084\7\64\2\2\u0084\u0085\5\34\17\2\u0085\u0099\3\2\2\2\u0086\u0088"+
		"\5\26\f\2\u0087\u0089\7\"\2\2\u0088\u0087\3\2\2\2\u0088\u0089\3\2\2\2"+
		"\u0089\u008a\3\2\2\2\u008a\u008b\5\34\17\2\u008b\u008c\7\64\2\2\u008c"+
		"\u008d\5\34\17\2\u008d\u0099\3\2\2\2\u008e\u0090\5\30\r\2\u008f\u0091"+
		"\7\"\2\2\u0090\u008f\3\2\2\2\u0090\u0091\3\2\2\2\u0091\u0092\3\2\2\2\u0092"+
		"\u0093\5\34\17\2\u0093\u0099\3\2\2\2\u0094\u0096\5\32\16\2\u0095\u0097"+
		"\7\"\2\2\u0096\u0095\3\2\2\2\u0096\u0097\3\2\2\2\u0097\u0099\3\2\2\2\u0098"+
		"|\3\2\2\2\u0098\u0086\3\2\2\2\u0098\u008e\3\2\2\2\u0098\u0094\3\2\2\2"+
		"\u0099\23\3\2\2\2\u009a\u009b\t\3\2\2\u009b\25\3\2\2\2\u009c\u009d\t\4"+
		"\2\2\u009d\27\3\2\2\2\u009e\u009f\7!\2\2\u009f\31\3\2\2\2\u00a0\u00a1"+
		"\7!\2\2\u00a1\33\3\2\2\2\u00a2\u00a6\5\66\34\2\u00a3\u00a6\5\36\20\2\u00a4"+
		"\u00a6\5\"\22\2\u00a5\u00a2\3\2\2\2\u00a5\u00a3\3\2\2\2\u00a5\u00a4\3"+
		"\2\2\2\u00a6\35\3\2\2\2\u00a7\u00aa\5 \21\2\u00a8\u00a9\7\63\2\2\u00a9"+
		"\u00ab\5 \21\2\u00aa\u00a8\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\37\3\2\2"+
		"\2\u00ac\u00ad\t\5\2\2\u00ad!\3\2\2\2\u00ae\u00af\7\'\2\2\u00af\u00b0"+
		"\5$\23\2\u00b0\u00b1\5 \21\2\u00b1\u00b2\5&\24\2\u00b2\u00b5\7+\2\2\u00b3"+
		"\u00b6\5 \21\2\u00b4\u00b6\5\66\34\2\u00b5\u00b3\3\2\2\2\u00b5\u00b4\3"+
		"\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00b8\7,\2\2\u00b8#\3\2\2\2\u00b9\u00bc"+
		"\t\6\2\2\u00ba\u00bc\3\2\2\2\u00bb\u00b9\3\2\2\2\u00bb\u00ba\3\2\2\2\u00bc"+
		"%\3\2\2\2\u00bd\u00c0\t\7\2\2\u00be\u00c0\3\2\2\2\u00bf\u00bd\3\2\2\2"+
		"\u00bf\u00be\3\2\2\2\u00c0\'\3\2\2\2\u00c1\u00c7\5,\27\2\u00c2\u00c3\5"+
		"*\26\2\u00c3\u00c4\5,\27\2\u00c4\u00c6\3\2\2\2\u00c5\u00c2\3\2\2\2\u00c6"+
		"\u00c9\3\2\2\2\u00c7\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8)\3\2\2\2"+
		"\u00c9\u00c7\3\2\2\2\u00ca\u00cb\t\2\2\2\u00cb+\3\2\2\2\u00cc\u00d2\5"+
		"\60\31\2\u00cd\u00ce\5.\30\2\u00ce\u00cf\5\60\31\2\u00cf\u00d1\3\2\2\2"+
		"\u00d0\u00cd\3\2\2\2\u00d1\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3"+
		"\3\2\2\2\u00d3-\3\2\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d6\t\b\2\2\u00d6"+
		"/\3\2\2\2\u00d7\u00dd\5\64\33\2\u00d8\u00d9\5\62\32\2\u00d9\u00da\5\64"+
		"\33\2\u00da\u00dc\3\2\2\2\u00db\u00d8\3\2\2\2\u00dc\u00df\3\2\2\2\u00dd"+
		"\u00db\3\2\2\2\u00dd\u00de\3\2\2\2\u00de\61\3\2\2\2\u00df\u00dd\3\2\2"+
		"\2\u00e0\u00e1\t\t\2\2\u00e1\63\3\2\2\2\u00e2\u00e3\7-\2\2\u00e3\u00e4"+
		"\5(\25\2\u00e4\u00e5\7.\2\2\u00e5\u00e9\3\2\2\2\u00e6\u00e9\7#\2\2\u00e7"+
		"\u00e9\5\66\34\2\u00e8\u00e2\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e8\u00e7\3"+
		"\2\2\2\u00e9\65\3\2\2\2\u00ea\u00eb\t\n\2\2\u00eb\67\3\2\2\2\u00ec\u00ed"+
		"\t\13\2\2\u00ed9\3\2\2\2\30=D[`gkpy~\u0088\u0090\u0096\u0098\u00a5\u00aa"+
		"\u00b5\u00bb\u00bf\u00c7\u00d2\u00dd\u00e8";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}